home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-05-09 | 1.0 KB | 75 lines | [TEXT/CWIE] |
- /*
- File: LSeperator.cp
-
- Contains: Apple Grayscale Appearance-savvy
- seperator line pane for PowerPlant.
-
- Copyright: ©1996 Chris K. Thomas All Rights Reserved.
-
- Version: 1.0
- */
-
- #include "LSeperator.h"
- #include "AGAColors.h"
-
- LSeperator*
- LSeperator::CreateSeperatorStream(LStream *inStream)
- {
- return new LSeperator(inStream);
- }
-
-
- LSeperator::LSeperator()
- {
-
- }
-
-
- LSeperator::LSeperator(LStream *inStream)
- :LPane(inStream)
- {
-
- }
-
-
- LSeperator::~LSeperator()
- {
-
- }
-
-
- void
- LSeperator::DrawSelf()
- {
- SDimension16 size;
- Rect r;
-
- GetFrameSize(size);
- CalcLocalFrameRect(r);
-
- //
- // if taller rather than wider
- //
- if(size.height > size.width)
- {
- RGBForeColor(&kColor7);
- MoveTo(r.left, r.top);
- LineTo(r.left, r.bottom - 1);
-
- RGBForeColor(&kWhiteColor);
- MoveTo(r.left + 1, r.top + 1);
- LineTo(r.left + 1, r.bottom);
- }
- else
- {
- RGBForeColor(&kColor7);
- MoveTo(r.left, r.top);
- LineTo(r.right - 1, r.top);
-
- RGBForeColor(&kWhiteColor);
- MoveTo(r.left + 1, r.top + 1);
- LineTo(r.right, r.top + 1);
- }
- }
-
-